package com.ygou.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.ygou.utils.jedis.RedisUtil;

public class JedisTest {
	public static void main(String[] args) {
		@SuppressWarnings("resource")  
        ApplicationContext context=new ClassPathXmlApplicationContext("classpath:spring/spring-redis.xml");  
        RedisUtil redisUtil=(RedisUtil) context.getBean("redisUtil");
        redisUtil.set("mykey","myvalue");
        String result=(String) redisUtil.get("mykey");
        System.out.println(result);
	}
}
